/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：GeneralMenuScreen.java <br>
 * 创建时间：2014-1-28 下午11:04:07 <br>
 * 所属项目：GmudEX <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.expand;

import java.util.ArrayList;

import lostland.gmud.exv2.Gmud;
import lostland.gmud.exv2.MainCharTile;
import lostland.gmud.exv2.MapScreen;
import lostland.gmud.exv2.MapTile;
import lostland.gmud.exv2.ui.TalkingWindow;
import lostland.gmud.exv2.ui.core.ScrollableMenuScreen;

/**
 * 类名：GeneralMenuScreen <br>
 * 说明：
 *
 * @author 12548
 */
public abstract class GeneralMenuScreen extends ScrollableMenuScreen {

	public TalkingWindow topWindow;

	public GeneralMenuScreen(ArrayList<String> s, String title) {
		super(Gmud.al2ar(s), 20, 30, 240, 8, false);
		topWindow = new TalkingWindow(title);
		refresh();
	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.ScrollableMenuScreen#drawbg()
	 */
	@Override
	public void drawbg() {

		if (buttons.length < 1) {
			onCancel();
		}

		MapScreen.getInstance().getMap().draw(MapTile.getInstance(), MapScreen.X, MapScreen.Y);
		MainCharTile.getInstance().drawInMap(MainCharTile.getInstance().currentDirection, MainCharTile.getInstance().currentStep, MainCharTile.getInstance().X, MainCharTile.getInstance().Y);

		topWindow.draw();
	}


	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.core.DialogScreen#isStable()
	 */
	@Override
	public boolean isStable() {
		return false;
	}

}
